package cn.drenal.capcap.entity;

import cn.drenal.capcap.entity.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tangzc.autotable.annotation.ColumnComment;
import com.tangzc.autotable.annotation.ColumnDefault;
import com.tangzc.autotable.annotation.ColumnNotNull;
import com.tangzc.mpe.autotable.annotation.*;
import com.tangzc.mpe.processer.annotation.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 活动投票表
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper
@Table(comment = "活动投票表")
public class ActivityVote extends BaseEntity {
    @ColumnComment("主键")
    @ColumnId(mode = IdType.AUTO)
    private Long id;

    @ColumnComment("用户ID")
    @ColumnNotNull
    private Long userId;

    @ColumnComment("活动ID")
    @ColumnNotNull
    private Long activityId;

    @ColumnComment("作品ID")
    @ColumnNotNull
    private Long artworkId;

    @ColumnComment("状态：0-有效，1-无效")
    @ColumnNotNull
    @ColumnDefault("0")
    private Integer status;
}